package com.ChengXiZi.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 帖子表
 *
 * @author ChengX
 * @since 2025-04-21 10:27:12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "post对象", description = "帖子表")
public class Post {


    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("内容")
    private String content;

    @ApiModelProperty("作者id")
    private Long userId;

    @ApiModelProperty("所属社区id")
    private Long communityId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("发帖时间")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("点赞数")
    private Integer likes;

    @ApiModelProperty("评论数")
    private Integer comments;

    @ApiModelProperty("收藏数")
    private Integer collects;

    @ApiModelProperty("浏览数")
    private Integer views;

    @ApiModelProperty("帖子类型")
    private Integer type;

    @ApiModelProperty("帖子状态")
    private Integer status;

    @ApiModelProperty("置顶状态")
    private Integer topStatus;

    @ApiModelProperty("精华状态")
    private Integer goodStatus;
}
